package com.shop2cn.app.liveseller.service;

import java.util.List;

import com.google.common.reflect.TypeToken;
import com.shop2cn.app.liveseller.parameter.LiveRoomDto;
import com.ymatou.iapi.liveseller.parameter.LiveActivityProductDtoV2;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取代理上级联播列表Call
*FreeMaker Template自动生成代码
*/
public class QueryInheritLiveListCall extends YmatouBaseCall{
	private static String opurl ="api/live/QueryInheritLiveList";
	
	public QueryInheritLiveListCall() {
		super(EnvSetup.getSystemUrl("liveseller_app"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public List<LiveRoomDto> getLiveRoomDtos(){
		String liveList=getJsonObject().get("liveList").getAsJsonArray().toString();
		List<LiveRoomDto> LiveList1=(List<LiveRoomDto>)FormatUtil.GSONToObject(liveList, new TypeToken<List<LiveRoomDto>>(){}.getType());
		return LiveList1;
	}
}